<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
// creation d'une session

session_start();
// Session Donnees
$_SESSION['nom']=$_POST['nom'];
$_SESSION['prenom']=$_POST['prenom'];
$_SESSION['pseudo']=$_POST['pseudo'];
//ende der Daten

$con = mysql_connect("localhost","root","");
if(!$con)
{
    die('Ne peut se connecter  :'.mysql_error());
}

//connection a la base de données
mysql_select_db("apple", $con);

// inserre les données du formulaire
$sql = "INSERT INTO wiesen (Noms,Prenoms,Emails,Pseudo,Motdepasses,Motdepasses2) VALUES('$_POST[nom]','$_POST[prenom]','$_POST[email]',
    '$_POST[pseudo]','$_POST[pass]','$_POST[pass2]')";
// si l'operation echoue !!!!

if(!mysql_query($sql,$con))
{
    die('Erreur:'.mysql_error());
}
//
{
    header('location:session_membre.php');
}
mysql_close($con);
?>
